package com.chenyi.pay.exception;

import com.chenyi.common.exception.BadRequestException;
import com.chenyi.common.utils.MessageUtils;
import lombok.Getter;
import org.springframework.http.HttpStatus;

import static org.springframework.http.HttpStatus.BAD_REQUEST;

/**
 * @author wangkh
 * @date 2020/10/27 0027  17:34
 */
@Getter
public class WxPayApiException extends RuntimeException {

    private Integer status = BAD_REQUEST.value();

    public WxPayApiException(String msg) {
        super(msg);
    }
    public WxPayApiException(HttpStatus status, String msg){
        super(msg);
        this.status = status.value();
    }

    public WxPayApiException(String msg, Object[] args){
        super(MessageUtils.message(msg,args));
    }

}
